From 2ca9b0cb1093d2556ec5769a6ffd47e1a621e6fb Mon Sep 17 00:00:00 2001
From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?=
There is also a babl API call for creating a format for a specific space. +
babl has API for creating a format for a specific space: babl_format_with_space("R'G'B' u16", babl_space ("Rec2020")) creates a 16 bit integer format for the Rec2020 color space. Babl knows internally about "sRGB", "Rec2020", "Adobe", "Apple" and "ProPhoto" spaces, as they are @@ -279,12 +279,10 @@ lab_buffer = malloc (pixel_count * 3 * sizeof (float));
The conversions babl does with ICC profiles are according to what is known as the relative-colorimetric intent, monitor profiles containing both the - matrices used by babl and 3d CLUTs (color look up tables) most often also do + matrices used by babl and 3d CLUTs (color look up tables) sometimes also do relative-colorimetric transfer for the "perceptual" intent CLUTs, but with - a more flexible and possibly higher accuracy conversions. If babl adds support - for loading and using CLUTs it will be thus the perceptual - intent will by babl be considered a different albeit more accurate - relative-colorimetric RGB space.
+ a more flexible and possibly higher accuracy conversions. +babl stores color information in transparent pre-multiplied or associated +alpha pixels in floating point formats. With floating point pixel formats +standard way of handling alpha maintains color information very near fully +transparent pixels - by introducing a limit: BABL_ALPHA_FLOOR which is +1/65536.0, and treating all alphas beteen zero and this value as this value we +maintain color information while the discrepancy in behavior gets concealed by +quantization in 16bit and 8bit formats. +
+For images that already are in a premultiplied format on import, this change +has no impact on its use for pre-multiplied arithmetic, meaning that +superluminous colors are still supported, it also opens up to GEGL more widely +expect premultiplied data in more operations which will become a speedup when +more filters want to integrate in the layer processing pipeline.
+ +There is a post on patreon with further details about details of the implementation.
-- 2.30.2